<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

	<xsl:template match="HeaderInfo">
     
	 
using System;
using System.Collections;
using Castle.ActiveRecord;
using Castle.ActiveRecord.Framework;
using NHibernate.Expression;

	 
namespace <xsl:value-of select="ProjectName"/>.ActiveRecord  
{
<![CDATA[
		[Serializable]
		public abstract class DataObject : ActiveRecordBase
		{
		
			// Provide Access to ActiveRecordBase functionality publicly.
		
			internal static int ARCountAll ( Type type )
			{
				return CountAll ( type );
			}
			
			internal static int ARCountAll ( Type type, string filter, params object[] args )
			{
				return CountAll ( type, filter , args );
			}
			
			internal static void ARDeleteAll ( Type type )
			{
				DeleteAll ( type );
			}
			
			internal static void ARDeleteAll ( Type type , string where )
			{
				DeleteAll ( type , where );
			}
			
			internal static Array ARFindAll ( Type type )
			{
				return FindAll ( type );
			}
			
			internal static Array ARFindAll ( Type type , params ICriterion[] criterias )
			{
				return FindAll ( type , criterias );
			}
			
			internal static object ARFindByPrimaryKey ( Type type , object id )
			{
			
				return FindByPrimaryKey ( type , id );
			}
			
			
			internal static object ARFindByPrimaryKey ( Type type , object id , bool throwOnNotFound )
			{
				return FindByPrimaryKey ( type , id , throwOnNotFound );
			}
			
			
			internal static object ARFindFirst ( Type type , params ICriterion[] criterias )
			{
				return FindFirst ( type , criterias );
			}
			
			internal static object ARExecuteQuery ( IActiveRecordQuery query )
			{
				return ExecuteQuery ( query );
			}
			
		
		}
]]>
}
	 
	 </xsl:template>
	 
	 
</xsl:stylesheet>


			
		<!--
		
			public DataObject FindByPrimaryKey ( object id , bool throwOnNotFound )
			{
				return ( DataObject ) FindByPrimaryKey ( objectType , id , throwOnNotFound );
			}
			
			
			public DataObject[] FindAllByProperty ( object value , string propertyName )
			{
				return ( DataObject[] ) FindAllByProperty ( objectType , propertyName , value );
			}
			
			
			public DataObject[] FindAll ()
			{
				return ( DataObject[] ) FindAll ( objectType );
			}
			
			-->
		
		
			<!--/*

			private Guid objectID;
			private DateTime modified;



			[ PrimaryKey ( PrimaryKeyType.Guid ) ]
			public Guid ObjectID
			{
				get
				{
					return objectID;
				}
				
				set
				{
					objectID = value;
				}
			}


			[ Timestamp() ]
			public DateTime Modified
			{
				get
				{
					return modified;
				}
				
				set
				{
					modified = value;
				}
			}



			*/-->
			
			
			
			
			
			
			
		